﻿@model IEnumerable<Scrumrun.Models.Sprint>

@{
    ViewBag.Title = "Sprint Settings";
}


<h3>Sprint Settings</h3>

<div class="row mainwrapper">
    <div class="span2">
        <ul class="unstyled">
            <li>
                @Html.ActionLink("View Backlog", "index", "Backlog", new { ProjectId = ViewBag.CurrentProject }, new { @class="btn btn-info"} )
            </li>
            <li>&nbsp;</li>
            <li>
                @Html.ActionLink("View Board", "SprintBoard", "Sprint",  new { ProjectId = ViewBag.CurrentProject }, new { @class="btn btn-primary"} )
            </li>

        </ul>
    </div>
    <!--sidebar-->

    <div class="span10">
        <div class="contentwrap">

            <div>
                @using (Ajax.BeginForm("SprintTable", "Iteration", null, new AjaxOptions
                {
                    HttpMethod = "Post",
                    InsertionMode = InsertionMode.Replace,
                    UpdateTargetId = "SprintTable"
                }, new { @Class = "form-horizontal" }))
                {
                    <fieldset>
                        <legend>Project</legend>

                        @Html.Hidden("ProjectId", (string)ViewBag.CurrentProject)

                        <div class="control-group">
                            <label class="control-label" for="NumOfIterationDay">Iteration period</label>

                            <div class="controls">
                                <input class="text-box single-line" data-val="true" data-val-number="The field Iteration days must be a number." data-val-required="The Iteration days field is required." 
                                    id="NumOfIterationDay" name="NumOfIterationDay" type="number"/>
                                <span class="field-validation-valid" data-valmsg-for="NumOfIterationDay" data-valmsg-replace="true"></span>
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label" for="WorkingDaysOnly">Working days only</label>

                            <div class="controls">
                                <input class="check-box" data-val="true" data-val-required="The Working days only field is required." 
                                    id="WorkingDaysOnly" name="WorkingDaysOnly" type="checkbox" value="false"/>
                                <span class="field-validation-valid" data-valmsg-for="WorkingDaysOnly" data-valmsg-replace="true"></span>
                            </div>
                        </div>
                        <div class="control-group">
                            <div class="controls">
                                <input type="submit" value="Save" class="btn btn-warning" />
                            </div>
                        </div>
                    </fieldset>
                }

            </div>

            <div id="SprintTable">

                @Html.Partial("_SprintTable", Model)

            </div>

            <!--tasks-->
        </div>
    </div>
</div>

